package com.rc.pojo.po.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class FarmTableDef extends TableDef {

    /**
     * 农场表 实体类。

 @author 27806
 @since 2024-06-15
     */
    public static final FarmTableDef FARM = new FarmTableDef();

    /**
     * 农场id
     */
    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn LAT = new QueryColumn(this, "lat");

    public final QueryColumn LNG = new QueryColumn(this, "lng");

    /**
     * 轮播图
     */
    public final QueryColumn IMGS = new QueryColumn(this, "imgs");

    /**
     * 农场名称
     */
    public final QueryColumn NAME = new QueryColumn(this, "name");

    public final QueryColumn SCORE = new QueryColumn(this, "score");

    /**
     * 地址
     */
    public final QueryColumn ADDRESS = new QueryColumn(this, "address");

    /**
     * 主要植物
     */
    public final QueryColumn MAIN_PLANT = new QueryColumn(this, "main_plant");

    /**
     * 创建时间
     */
    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    /**
     * 更新时间
     */
    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "update_time");

    /**
     * 简介
     */
    public final QueryColumn DESCRIPTION = new QueryColumn(this, "description");

    public final QueryColumn RECOMMENDED = new QueryColumn(this, "recommended");

    /**
     * 主要活动
     */
    public final QueryColumn MAIN_ACTIVITY = new QueryColumn(this, "main_activity");

    /**
     * 适宜月份
     */
    public final QueryColumn SUITABLE_MONTH = new QueryColumn(this, "suitable_month");

    /**
     * 主要人群
     */
    public final QueryColumn MAIN_POPULATION = new QueryColumn(this, "main_population");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, LAT, LNG, IMGS, NAME, SCORE, ADDRESS, MAIN_PLANT, CREATE_TIME, UPDATE_TIME, DESCRIPTION, RECOMMENDED, MAIN_ACTIVITY, SUITABLE_MONTH, MAIN_POPULATION};

    public FarmTableDef() {
        super("rc", "farm");
    }

    private FarmTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public FarmTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new FarmTableDef("rc", "farm", alias));
    }

}
